/**
 * Created by Dalyn on 2017/3/16.
 */
import Relay from "react-relay";

export default class UserDetailMutation extends Relay.Mutation {

    static fragments = {};

    getMutation() {
        return Relay.QL`mutation { updatePassword }`;
    }

    getVariables() {
        return {
            argsInput: {
                phone:this.props.phone,
                password:this.props.password,
                newPassword:this.props.newPassword,

            }
        };
    }

    getFatQuery() {
        return Relay.QL`fragment on updatePasswordPayload {
            updatePassword {  
                errorCode
                value
                totalResult
                id
                userModel{
                    name
                }
            }
        }`;
    }

    getConfigs() {
        return [{
            type: 'REQUIRED_CHILDREN',
            children: [Relay.QL`
              fragment on updatePasswordPayload {
                    updatePassword {  
                        errorCode
                        value
                        totalResult
                        id
                        userModel{
                            name
                        }
                    }
                }
            `]
        }];
    }

}